import { Ref } from "vue";
// 公共普通的对象类型
export interface KeyValue<T> {
  [key: string]: T;
}
// 公共方向 类型
export type Direction = "top" | "right" | "bottom" | "left";

// 公共位置 类型
export type Site = "top" | "right" | "bottom" | "left";

// 开关对象
export type Switch<T extends Record<any, any>> =
  | boolean
  | (T & { enabled: boolean });
export type SwitchObj<T extends Record<any, any>> =
  | { enabled: boolean }
  | ({ enabled: boolean } & T);

export type TOA<T> = T | T[];
export type TOR<T> = T | Ref<T>;
export type TORA<T> = TOR<TOA<T>>;
